

#ifndef __LOGIN_SERVER_H__
#define __LOGIN_SERVER_H__


#include <memory>

#include <boost/beast/http.hpp>
#include <boost/beast.hpp>
#include <boost/asio.hpp>

// 监听客户端的连接
class LoginServer: public std::enable_shared_from_this<LoginServer>
{
public:
    using tcp = boost::asio::ip::tcp;

    LoginServer(boost::asio::io_context& ioc, uint16_t port);

    // 监听客户端连接
    void Start();

private:
    tcp::acceptor _acceptor;
    boost::asio::io_context& _ioc;
};

#endif // !__LOGIN_SERVER_H__
